def get_digit(x):
    s = 0
    lst = []
    for item in x:
        if item.isdigit():
            lst.append(int(item))
    s = sum(lst)
    return lst, s


ss = input('please input str:')

lst, x = get_digit(ss)
print('lst:', lst)
print("x:", x)
